import { mapState,mapMutations } from 'vuex'
export default {
	install(Vue){
		Vue.mixin({
			data(){
				return{
					
				}
			},
			methods:{
				checkedisLogin() {
					return new Promise((resolve,reject)=>{
						if(this.userInfo) {
							resolve(true)
						}else{
							// 未登录
							uni.navigateTo({
								url:'/pages/login/index'
							})
						}
					})
					console.log(this.userInfo)
				},
				 ...mapMutations(['updateUserInfo'])
			},
			computed:{
				...mapState(['userInfo'])
			}
		})
	}
}